import { Action } from "@ngrx/store";
import {
  ISelectSymbolResponse,
  ISelectSymbolRequest,
  ISelectOrderResponse,
  ISelectOrderRequest,
  IAddOrderRequest,
  IAddOrderResponse,
  IDelOrderRequest,
  IDelOrderResponse
} from "../models/share";
export enum ShareActionTypes {
  SelectSymbol = "[Share] SelectSymbol",
  SelectSymbolSuccess = "[Share] Select Symbol Success",
  SelectSymbolError = "[Share] Select Symbol Error"
}

export class SelectSymbol implements Action {
  readonly type = ShareActionTypes.SelectSymbol;
  constructor(public payload: { req: ISelectSymbolRequest }) {}
}

export class SelectSymbolSuccess implements Action {
  readonly type = ShareActionTypes.SelectSymbolSuccess;
  constructor(public payload: { res: ISelectSymbolResponse }) {}
}

export class SelectSymbolError implements Action {
  readonly type = ShareActionTypes.SelectSymbolError;
  constructor(public payload: { error: any }) {}
}

export type ShareActionsUnion =
  | SelectSymbol
  | SelectSymbolSuccess
  | SelectSymbolError;
